n8n - Step by Step Guide

Visual guide to setting up the n8n Fideltour node from scratch: installation, credentials, a first workflow that queries HotelDataHub, and a workflow that starts automatically from a Fideltour webhook. The full reference for resources, operations and events is on the n8n page.

Table of contents


Before you start

You need:

  • An n8n instance (self-hosted or n8n Cloud) with admin permissions to install community nodes. The screenshots in this guide are from n8n 2.31.
  • A HotelDataHub API user (ApiUser) with the contacts and movements permissions (and segments if you'll use the audience triggers). Request it from hoteldatahub@fideltour.com along with the chain code (hotel_chain) and the hotel identifiers.
  • For triggers, the n8n instance must be reachable from the internet: HotelDataHub calls the n8n webhook URL every time an event occurs.

1. Install the community node

  1. In n8n, open Settings → Community nodes (gear icon, bottom left) and click Install a community node.

n8n Community nodes page with the n8n-nodes-fideltour package installed

The screenshots in this guide show n8n's interface in Spanish, but the fields and buttons work the same way in English.

  1. Enter the package name, n8n-nodes-fideltour, check the acceptance box and click Install. n8n downloads the npm package and registers the nodes without needing a restart.

Install community nodes dialog with the n8n-nodes-fideltour package

Once done, the package appears in the list with its two nodes: Fideltour (actions) and Fideltour Trigger (events). To update to a new version, use the package's ⋮ menu → Update.

n8n Cloud: installation works the same way from Settings → Community nodes. If the package doesn't yet show as verified, the instance needs the unverified community nodes option enabled.


2. Create the Fideltour API credential

  1. Go to Credentials (from the Overview panel or the side menu) and click Create credential. Search for Fideltour API and click Continue.

n8n credential search showing Fideltour API

  1. Fill in the three fields:
Field Value
Base URL https://app.hoteldatahub.io (no trailing slash)
Username HotelDataHub API user
Password API user's password

The Session Token field is left empty: the node logs in against POST /api/v1/login/ and stores the JWT there, renewing it automatically when it expires (24h).

Fideltour API credential form with Base URL, Username and Password

  1. Click Save. n8n tests the credential by performing a GET /api/v1/entries/; if the username and password are correct and the user has the movements permission, Connection tested successfully appears.

Saved Fideltour API credential with the Connection tested successfully message

It's a good idea to name the credential Fideltour API: it's the name used by this guide's example workflows and by the n8n page, so they can be pasted in directly without reassigning credentials.


3. First workflow: look up a contact

Goal: a manual workflow that looks up a contact in HotelDataHub by their email. It's the fastest way to check that the installation and credential are working.

  1. Create a new workflow (+ → Workflow) and add the Manual trigger as the first step (When clicking 'Execute workflow').

  2. Click the + button (top right of the canvas) and search for Fideltour. The node appears with the FT icon.

n8n node search with the Fideltour result

  1. Selecting it shows the actions grouped by resource (Contact, Loyalty, Movement, Web Form). Choose Get many contacts.

List of Fideltour node actions grouped by resource

The node is now connected to the manual trigger:

Canvas with the manual trigger connected to the Get Many Contacts node

  1. Configure the node: select the Fideltour API credential, leave Resource = Contact and Operation = Get Many, and under Filters add Email with the email to search for. Limit and Offset control pagination (the API's limit/offset).

Fideltour node panel with Contact, Get Many and an email filter

  1. Click Execute step. The output (OUTPUT) shows the GET /api/v1/contacts/ response: count, next, previous and results with each contact's full record (id, name, email, language, country, loyalty level, consents…).

Node output with the contact found in HotelDataHub

  1. When you close the panel, the canvas marks both nodes green with the number of items that passed through each connection.

Workflow executed successfully, nodes in green and 1 item

The ID returned by this node (results[0].id) is what the rest of the operations need (Contact → Update, Movement → Create, Loyalty → Sign In…): reference it with an expression like {{ $json.results[0].id }}.

Full workflow (paste onto the canvas with Ctrl+V):

{
  "name": "Fideltour - Search contact by email",
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [0, 0],
      "name": "When clicking 'Execute workflow'"
    },
    {
      "parameters": {
        "resource": "contact",
        "operation": "getAll",
        "limit": 10,
        "filters": { "email": "cliente@example.com" }
      },
      "type": "n8n-nodes-fideltour.fideltour",
      "typeVersion": 1,
      "position": [260, 0],
      "name": "Get Many Contacts",
      "credentials": { "fideltourApi": { "name": "Fideltour API" } }
    }
  ],
  "connections": {
    "When clicking 'Execute workflow'": {
      "main": [[{ "node": "Get Many Contacts", "type": "main", "index": 0 }]]
    }
  }
}

4. Workflow with a trigger: react to a created contact

Goal: have n8n start a workflow every time a contact is created in Fideltour. The Fideltour Trigger node registers the subscription (REST hook) in HotelDataHub by itself when the workflow is published, and removes it when unpublished.

  1. Create a new workflow, click Add first step, search for Fideltour and choose Fideltour Trigger (in the Triggers section). Then add any node that consumes the event; in the example, an Edit Fields node that prepares a greeting from the contact.

Canvas with Fideltour Trigger connected to an Edit Fields node

  1. Open the trigger, select the Fideltour API credential and the desired Event (here Contact Created). Expanding Webhook URLs shows the two URLs n8n exposes for this node:
  • Test URL (/webhook-test/...): only listens while Execute step / Test this trigger is active in the editor.
  • Production URL (/webhook/...): the one the node registers in HotelDataHub once the workflow is published.

Fideltour Trigger panel with the Contact Created event and the Production URL

  1. Click Publish (in earlier n8n versions, the Active toggle). You'll be asked for a version name, and once confirmed, n8n activates the workflow.

n8n Publish workflow dialog

At that point the node calls POST /api/v1/webhooks/zapier-webhooks-subscriptions/ with the Production URL and the event type (5 = Contact Created). If the call fails (credential without the contacts permission, non-public URL…), n8n shows the error and does not publish the workflow.

Published workflow, with the Published status in the header

  1. From here on, every contact created in Fideltour triggers an execution. They're listed in the Executions tab; opening one, the Logs panel shows the payload received by the trigger (the contact's record plus hotel_chain) and each node's output.

Workflow execution with the contact payload in the Logs panel

Full workflow:

{
  "name": "Fideltour - Contact created",
  "nodes": [
    {
      "parameters": { "event": 5 },
      "type": "n8n-nodes-fideltour.fideltourTrigger",
      "typeVersion": 1,
      "position": [0, 0],
      "name": "Fideltour Trigger",
      "credentials": { "fideltourApi": { "name": "Fideltour API" } }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            { "id": "x1", "name": "contact_id", "value": "={{ $json.id }}", "type": "number" },
            { "id": "x2", "name": "email", "value": "={{ $json.email }}", "type": "string" },
            { "id": "x3", "name": "greeting", "value": "=Hello {{ $json.name }} {{ $json.surname }}, welcome to {{ $json.hotel_chain }}", "type": "string" }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [260, 0],
      "name": "Prepare data"
    }
  ],
  "connections": {
    "Fideltour Trigger": {
      "main": [[{ "node": "Prepare data", "type": "main", "index": 0 }]]
    }
  }
}

Testing without waiting for a real event: with the workflow published, a POST to the Production URL with a JSON body generates an execution identical to the one HotelDataHub would produce. This is useful for building the rest of the workflow with a sample payload. The payload for each event is described on the Zapier page (they're the same).


5. Check the subscription in HotelDataHub

The subscription created by the trigger can be checked with the same API user (each ApiUser only sees its own):

GET https://app.hoteldatahub.io/api/v1/webhooks/zapier-webhooks-subscriptions/
Authorization: Token <jwt>
{
  "count": 1,
  "results": [
    {
      "id": 61,
      "url": "https://n8n.mi-hotel.com/webhook/3f7c2a1e-5b7d-4c1e-9a0b-6d2e8f1a2b3c/webhook",
      "type": 5
    }
  ]
}

When you unpublish the workflow (or delete it), the node performs DELETE .../zapier-webhooks-subscriptions/{id}/ and the subscription disappears. If a workflow is deleted while the n8n instance is down, the subscription can be left orphaned: in that case, delete it by hand with the same DELETE call.

For contact and movement events to reach HotelDataHub (and from there, n8n), Fideltour must have the customer's generic webhooks configured, the same as for Zapier (see REST hooks subscription).


Common issues

Symptom Common cause Solution
The credential fails the test (401 / 403) Incorrect username or password, or the ApiUser doesn't have the movements permission (the test performs GET /entries/) Check the credentials and permissions with HotelDataHub
Error publishing a workflow with Fideltour Trigger The subscription can't be registered: the event's permission is missing (contacts, movements or segments) Request the necessary permission for the ApiUser
The workflow is published but isn't receiving events n8n isn't reachable from the internet, or WEBHOOK_URL points to an internal URL Expose n8n with a public URL and configure WEBHOOK_URL on the instance; republish the workflow so the correct URL gets registered
Contact → Create returns a duplicate email error The email already exists in Fideltour Search first with Get Many filtering by email, or use Web Form → Submit, which does an upsert
Package installation fails on self-hosted n8n on Windows (tar ... Cannot open) n8n bug when extracting packages on Windows paths Install it manually with npm install n8n-nodes-fideltour inside ~/.n8n/nodes and restart n8n, or use Docker/Linux